var postsData = require("../../data/post-data.js")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    data:"Nov 25 2016",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    /*this.postList = postsData.postList*/
    this.setData({
      postList: postsData.postList
    });
  },

  onPostTap:function(e){
    var postId = e.currentTarget.dataset.postid
    console.log("postid" + postId)
    wx.navigateTo({
      url: "post-detail/post-detail?id=" + postId
    })
  },
  onSwiperTap:function(e) {
    var postId = e.target.dataset.postid
    console.log("postid" + postId)
    wx.navigateTo({
      url: "post-detail/post-detail?id=" + postId
    })
  }
})